package app

import (
	"context"

	"github.com/wailsapp/wails/v2/pkg/runtime"
)

// App struct
type App struct {
	ctx context.Context
}

// NewApp creates a new App application struct
func NewApp() *App {
	return &App{}
}

// startup is called at application startup
func (a *App) Startup(ctx context.Context) {
	// Perform your setup here
	a.ctx = ctx
	runtime.EventsOn(ctx, "event:compressFileList", func(optionalData ...interface{}) {})
	runtime.EventsOn(ctx, "event:compressSession", func(optionalData ...interface{}) {})
	runtime.EventsOn(ctx, "event:fileStateUpdate", func(optionalData ...interface{}) {})
}

// domReady is called after the front-end dom has been loaded
func (a App) DomReady(ctx context.Context) {
	// Add your action here
}

// shutdown is called at application termination
func (a *App) Shutdown(ctx context.Context) {
	// Perform your teardown here
}
